import { NgModule } from '@angular/core'
import { SharedModule } from '@shared'

import { TradesRoutingModule } from './trades-routing.module'
import { TradeAlinterService } from './trade-alinter.service'
import { TradesListComponent } from './list/list.component'
import { TradesStatisticsComponent } from './statistics/statistics.component'
import { TradesOnlineChargeComponent } from './charge/list/online-charge.component'
import { TradesDetailComponent } from './detail/detail.component'
import { TradeService } from './trade-abstract.service'
import { TradeChargeNewComponent } from './charge/new/new.component'
import { TradeChargeNewSystemComponent } from './charge/new/system/system.component'
import { TradeChargeNewOrderComponent } from './charge/new/order/order.component'
import { ChargeStoreService } from './charge/new/charge-base.service'
import { TradeChargeDetailComponent } from './charge/detail/charge-detail.component'
import { TradesRefundComponent } from './refund/refund.component'
import { RelatedTradesComponent } from './detail/related-trades/related-trades.component'
import { TradesDetailECComponent } from './detail-ec/detail.component'
import { TradesPresentComponent } from './present/present.component'
import { TradesBatchPresentListComponent } from './batch-present-list/present.component'
import { TradesBatchPresentComponent } from './batch-present/present.component'

const COMPONENTS = [
  TradesListComponent,
  TradesStatisticsComponent,
  TradesOnlineChargeComponent,
  TradesDetailComponent,
  TradesDetailECComponent,
  TradeChargeNewComponent,
  TradeChargeNewSystemComponent,
  TradeChargeNewOrderComponent,
  TradeChargeDetailComponent,
  RelatedTradesComponent,
]
const COMPONENTS_NOROUNT = [
  TradeChargeNewSystemComponent,
  TradeChargeNewOrderComponent,
  TradeChargeDetailComponent,
  TradesRefundComponent,
  TradesPresentComponent,
  TradesBatchPresentListComponent,
  TradesBatchPresentComponent
]

@NgModule({
  imports: [SharedModule, TradesRoutingModule],
  declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [{ provide: TradeService, useClass: TradeAlinterService },
    ChargeStoreService],
})
export class TradesModule { }
